<template>
	<view>
		<view style="background-color: #FFFFFF;border-radius: 20rpx;margin:20rpx 20rpx 0 20rpx;padding: 20rpx;line-height: 50rpx;" v-for="(item,index) in lists" :key="index">
			<view class="cflex-r" style="justify-content: space-between;">
				<text style="font-weight: bold;font-size: 30rpx;">{{item.type}}</text>
				<text style="color: #FF5400;font-weight: bold;font-size: 30rpx;">￥{{item.changemoney}}</text>
			</view>
			<view class="cflex-r" style="justify-content: space-between;">
				<text>备注</text>
				<text style="text-align: right; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;width: 550rpx;">{{item.des}}</text>
			</view>
			<view class="cflex-r" style="justify-content: space-between;">
				<text>时间</text>
				<text>{{item.addtime}}</text>
			</view>
		</view>
		
		<view class="u-p-20"><u-loadmore :status="status" /></view>
	</view>
</template>	

<script>
	export default {
		data(){
			return {
				lists: [],
				pages: {pageNo:1,pageSize:20},
				status: 'loading'
			}
		},
		onShow() {
			this.pages.pageNo = 1;
			this.billReq();
		},
		onLoad() {
			
		},
		onReachBottom() {
			if(this.status=='nomore')return;
			this.billReq();
		},
		methods:{
			billReq(){
				this.status = "loading";
				this.$request("worker/tixian/moneyChangeList",{pageNo:this.pages.pageNo,pageSize:this.pages.pageSize}).then(res=>{
					console.log("账号流水=============>",res);
					let tempLists = res.data==null?[]:res.data;
					if(this.pages.pageNo == 1){
						this.lists = [];
					}
					this.lists = this.lists.concat(tempLists);
					
					if(tempLists.length<this.pages.pageSize){
						this.status = "nomore";
					}
					this.pages.pageNo = this.pages.pageNo +1;
				})
			}
		}
	}
</script>

<style>
	page {
		background-color: #F6F7F8;
	}
</style>
